package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;


/**
 * The persistent class for the PARTIDA database table.
 * 
 */
@Entity
@Table(name="PARTIDA")
public class Partida implements Serializable {
	private static final long serialVersionUID = 1L;
	private long refnumPart;
	private String agntSync;
	private String coLibrOrig;
	private String coPais;
	private String estado;
	private BigDecimal numAcumAsie;
	private BigDecimal numAcumPag;
	private String numPartida;
	private Date tsInscrip;
	private Date tsUltSync;
	private Set<Asiento> asientos;
	private Set<DereMine> dereMines;
	private Ficha ficha;
	private Set<Gravamen> gravamens;
	private Set<IndPrtc> indPrtcs;
	private OtroImage otroImage;
	private TmLibro tmLibro;
	private OficRegistral oficRegistral;
	private TmAreaRegistral tmAreaRegistral;
	private Set<PartidaRmc> partidaRmcs1;
	private Set<PartidaRmc> partidaRmcs2;
	private Set<RazSocPj> razSocPjs;
	private Set<RegAeronave> regAeronaves;
	private Set<RegBuque> regBuques;
	private Set<RegEmbPesq> regEmbPesqs;
	private Set<RegNave> regNaves;
	private Set<RegPredio> regPredios;
	private Set<SociMine> sociMines;
	private Set<TomoFolio> tomoFolios;
	private Set<Vehiculo> vehiculos;
	private Set<VehiculoHist> vehiculoHists;

    public Partida() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="REFNUM_PART", unique=true, nullable=false)
	public long getRefnumPart() {
		return this.refnumPart;
	}

	public void setRefnumPart(long refnumPart) {
		this.refnumPart = refnumPart;
	}


	@Column(name="AGNT_SYNC", length=4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}


	@Column(name="CO_LIBR_ORIG", length=3)
	public String getCoLibrOrig() {
		return this.coLibrOrig;
	}

	public void setCoLibrOrig(String coLibrOrig) {
		this.coLibrOrig = coLibrOrig;
	}


	@Column(name="CO_PAIS", length=3)
	public String getCoPais() {
		return this.coPais;
	}

	public void setCoPais(String coPais) {
		this.coPais = coPais;
	}


	@Column(nullable=false, length=1)
	public String getEstado() {
		return this.estado;
	}

	public void setEstado(String estado) {
		this.estado = estado;
	}


	@Column(name="NUM_ACUM_ASIE", precision=5)
	public BigDecimal getNumAcumAsie() {
		return this.numAcumAsie;
	}

	public void setNumAcumAsie(BigDecimal numAcumAsie) {
		this.numAcumAsie = numAcumAsie;
	}


	@Column(name="NUM_ACUM_PAG", precision=5)
	public BigDecimal getNumAcumPag() {
		return this.numAcumPag;
	}

	public void setNumAcumPag(BigDecimal numAcumPag) {
		this.numAcumPag = numAcumPag;
	}


	@Column(name="NUM_PARTIDA", nullable=false, length=8)
	public String getNumPartida() {
		return this.numPartida;
	}

	public void setNumPartida(String numPartida) {
		this.numPartida = numPartida;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_INSCRIP")
	public Date getTsInscrip() {
		return this.tsInscrip;
	}

	public void setTsInscrip(Date tsInscrip) {
		this.tsInscrip = tsInscrip;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}


	//bi-directional many-to-one association to Asiento
	@OneToMany(mappedBy="partida")
	public Set<Asiento> getAsientos() {
		return this.asientos;
	}

	public void setAsientos(Set<Asiento> asientos) {
		this.asientos = asientos;
	}
	

	//bi-directional many-to-one association to DereMine
	@OneToMany(mappedBy="partida")
	public Set<DereMine> getDereMines() {
		return this.dereMines;
	}

	public void setDereMines(Set<DereMine> dereMines) {
		this.dereMines = dereMines;
	}
	

	//bi-directional one-to-one association to Ficha
	@OneToOne(mappedBy="partida")
	public Ficha getFicha() {
		return this.ficha;
	}

	public void setFicha(Ficha ficha) {
		this.ficha = ficha;
	}
	

	//bi-directional many-to-one association to Gravamen
	@OneToMany(mappedBy="partida")
	public Set<Gravamen> getGravamens() {
		return this.gravamens;
	}

	public void setGravamens(Set<Gravamen> gravamens) {
		this.gravamens = gravamens;
	}
	

	//bi-directional many-to-one association to IndPrtc
	@OneToMany(mappedBy="partida")
	public Set<IndPrtc> getIndPrtcs() {
		return this.indPrtcs;
	}

	public void setIndPrtcs(Set<IndPrtc> indPrtcs) {
		this.indPrtcs = indPrtcs;
	}
	

	//bi-directional one-to-one association to OtroImage
	@OneToOne(mappedBy="partida")
	public OtroImage getOtroImage() {
		return this.otroImage;
	}

	public void setOtroImage(OtroImage otroImage) {
		this.otroImage = otroImage;
	}
	

	//bi-directional many-to-one association to TmLibro
    @ManyToOne
	@JoinColumn(name="COD_LIBRO", nullable=false)
	public TmLibro getTmLibro() {
		return this.tmLibro;
	}

	public void setTmLibro(TmLibro tmLibro) {
		this.tmLibro = tmLibro;
	}
	

	//bi-directional many-to-one association to OficRegistral
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="OFIC_REG_ID", referencedColumnName="OFIC_REG_ID", nullable=false),
		@JoinColumn(name="REG_PUB_ID", referencedColumnName="REG_PUB_ID", nullable=false)
		})
	public OficRegistral getOficRegistral() {
		return this.oficRegistral;
	}

	public void setOficRegistral(OficRegistral oficRegistral) {
		this.oficRegistral = oficRegistral;
	}
	

	//bi-directional many-to-one association to TmAreaRegistral
    @ManyToOne
	@JoinColumn(name="AREA_REG_ID", nullable=false)
	public TmAreaRegistral getTmAreaRegistral() {
		return this.tmAreaRegistral;
	}

	public void setTmAreaRegistral(TmAreaRegistral tmAreaRegistral) {
		this.tmAreaRegistral = tmAreaRegistral;
	}
	

	//bi-directional many-to-one association to PartidaRmc
	@OneToMany(mappedBy="partida1")
	public Set<PartidaRmc> getPartidaRmcs1() {
		return this.partidaRmcs1;
	}

	public void setPartidaRmcs1(Set<PartidaRmc> partidaRmcs1) {
		this.partidaRmcs1 = partidaRmcs1;
	}
	

	//bi-directional many-to-one association to PartidaRmc
	@OneToMany(mappedBy="partida2")
	public Set<PartidaRmc> getPartidaRmcs2() {
		return this.partidaRmcs2;
	}

	public void setPartidaRmcs2(Set<PartidaRmc> partidaRmcs2) {
		this.partidaRmcs2 = partidaRmcs2;
	}
	

	//bi-directional many-to-one association to RazSocPj
	@OneToMany(mappedBy="partida")
	public Set<RazSocPj> getRazSocPjs() {
		return this.razSocPjs;
	}

	public void setRazSocPjs(Set<RazSocPj> razSocPjs) {
		this.razSocPjs = razSocPjs;
	}
	

	//bi-directional many-to-one association to RegAeronave
	@OneToMany(mappedBy="partida")
	public Set<RegAeronave> getRegAeronaves() {
		return this.regAeronaves;
	}

	public void setRegAeronaves(Set<RegAeronave> regAeronaves) {
		this.regAeronaves = regAeronaves;
	}
	

	//bi-directional many-to-one association to RegBuque
	@OneToMany(mappedBy="partida")
	public Set<RegBuque> getRegBuques() {
		return this.regBuques;
	}

	public void setRegBuques(Set<RegBuque> regBuques) {
		this.regBuques = regBuques;
	}
	

	//bi-directional many-to-one association to RegEmbPesq
	@OneToMany(mappedBy="partida")
	public Set<RegEmbPesq> getRegEmbPesqs() {
		return this.regEmbPesqs;
	}

	public void setRegEmbPesqs(Set<RegEmbPesq> regEmbPesqs) {
		this.regEmbPesqs = regEmbPesqs;
	}
	

	//bi-directional many-to-one association to RegNave
	@OneToMany(mappedBy="partida")
	public Set<RegNave> getRegNaves() {
		return this.regNaves;
	}

	public void setRegNaves(Set<RegNave> regNaves) {
		this.regNaves = regNaves;
	}
	

	//bi-directional many-to-one association to RegPredio
	@OneToMany(mappedBy="partida")
	public Set<RegPredio> getRegPredios() {
		return this.regPredios;
	}

	public void setRegPredios(Set<RegPredio> regPredios) {
		this.regPredios = regPredios;
	}
	

	//bi-directional many-to-one association to SociMine
	@OneToMany(mappedBy="partida")
	public Set<SociMine> getSociMines() {
		return this.sociMines;
	}

	public void setSociMines(Set<SociMine> sociMines) {
		this.sociMines = sociMines;
	}
	

	//bi-directional many-to-one association to TomoFolio
	@OneToMany(mappedBy="partida")
	public Set<TomoFolio> getTomoFolios() {
		return this.tomoFolios;
	}

	public void setTomoFolios(Set<TomoFolio> tomoFolios) {
		this.tomoFolios = tomoFolios;
	}
	

	//bi-directional many-to-one association to Vehiculo
	@OneToMany(mappedBy="partida")
	public Set<Vehiculo> getVehiculos() {
		return this.vehiculos;
	}

	public void setVehiculos(Set<Vehiculo> vehiculos) {
		this.vehiculos = vehiculos;
	}
	

	//bi-directional many-to-one association to VehiculoHist
	@OneToMany(mappedBy="partida")
	public Set<VehiculoHist> getVehiculoHists() {
		return this.vehiculoHists;
	}

	public void setVehiculoHists(Set<VehiculoHist> vehiculoHists) {
		this.vehiculoHists = vehiculoHists;
	}
	
}